package org.jeecg.modules.demo.mall.entity;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.modules.demo.mall.dto.GoodsSkuDto;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Description: yx_store_product
 * @Author: jeecg-boot
 * @Date: 2023-10-19
 * @Version: V1.0
 */
@Data
@TableName("yx_store_product")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "yx_store_product对象", description = "yx_store_product")
public class YxStoreProduct implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 商品id
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "商品id")
    private Integer id;
    /**
     * 商户Id(0为总后台管理员创建,不为0的时候是商户后台创建)
     */
    @Excel(name = "商户Id(0为总后台管理员创建,不为0的时候是商户后台创建)", width = 15)
    @ApiModelProperty(value = "商户Id(0为总后台管理员创建,不为0的时候是商户后台创建)")
    private Integer merId;
    /**
     * 商品图片
     */
    @Excel(name = "商品图片", width = 15)
    @ApiModelProperty(value = "商品图片")
    private String image;
    /**
     * 轮播图
     */
    @Excel(name = "轮播图", width = 15)
    @ApiModelProperty(value = "轮播图")
    private String sliderImage;
    /**
     * 商品名称
     */
    @Excel(name = "商品名称", width = 15)
    @ApiModelProperty(value = "商品名称")
    private String storeName;
    /**
     * 商品简介
     */
    @Excel(name = "商品简介", width = 15)
    @ApiModelProperty(value = "商品简介")
    private String storeInfo;
    /**
     * 关键字
     */
    @Excel(name = "关键字", width = 15)
    @ApiModelProperty(value = "关键字")
    private String keyword;
    /**
     * 产品条码（一维码）
     */
    @Excel(name = "产品条码（一维码）", width = 15)
    @ApiModelProperty(value = "产品条码（一维码）")
    private String barCode;
    /**
     * 分类id
     */
    @Excel(name = "分类id", width = 15)
    @ApiModelProperty(value = "分类id")
//    @Dict(dictTable = "yx_store_category",dicCode = "id",dicText = "cate_name")
    private String cateId;
    /**
     * 商品价格
     */
    @Excel(name = "商品价格", width = 15)
    @ApiModelProperty(value = "商品价格")
    private BigDecimal price;
    /**
     * 会员价格
     */
    @Excel(name = "会员价格", width = 15)
    @ApiModelProperty(value = "会员价格")
    private BigDecimal vipPrice;
    /**
     * 划线价
     */
    @Excel(name = "划线价", width = 15)
    @ApiModelProperty(value = "划线价")
    private BigDecimal otPrice;
    /**
     * 邮费
     */
    @Excel(name = "邮费", width = 15)
    @ApiModelProperty(value = "邮费")
    private BigDecimal postage;
    /**
     * 单位名
     */
    @Excel(name = "单位名", width = 15)
    @ApiModelProperty(value = "单位名")
    private String unitName;
    /**
     * 排序
     */
    @Excel(name = "排序", width = 15)
    @ApiModelProperty(value = "排序")
    private Integer sort;
    /**
     * 销量
     */
    @Excel(name = "销量", width = 15)
    @ApiModelProperty(value = "销量")
    private Integer sales;
    /**
     * 限制人数
     */
    @Excel(name = "限制人数", width = 15)
    @ApiModelProperty(value = "限制人数")
    private Integer stock;
    /**
     * 状态（0：未上架，1：上架）
     */
    @Excel(name = "状态（0：未上架，1：上架）", width = 15)
    @ApiModelProperty(value = "状态（0：未上架，1：上架）")
    @Dict(dicCode = "Mer_Prodct_isShow")
    private Integer isShow;
    /**
     * /**
     * 是否热卖
     */
    @Dict(dicCode = "YXYC-YN")
    @Excel(name = "是否热卖", width = 15)
    @ApiModelProperty(value = "是否热卖")
    private Integer isHot;
    /**
     * 是否优惠
     */
    @Dict(dicCode = "YXYC-YN")
    @Excel(name = "是否优惠", width = 15)
    @ApiModelProperty(value = "是否优惠")
    private Integer isBenefit;
    /**
     * 是否精品
     */
    @Dict(dicCode = "YXYC-YN")
    @Excel(name = "是否精品", width = 15)
    @ApiModelProperty(value = "是否精品")
    private Integer isBest;
    /**
     * 是否新品
     */
    @Dict(dicCode = "YXYC-YN")
    @Excel(name = "是否新品", width = 15)
    @ApiModelProperty(value = "是否新品")
    private Integer isNew;
    /**
     * 产品描述
     */
    @Excel(name = "产品描述", width = 15)
    @ApiModelProperty(value = "产品描述")
    private String description;
    /**
     * 添加时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "添加时间")
    private Date createTime;
    /**
     * updateTime
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "updateTime")
    private Date updateTime;
    /**
     * 是否包邮
     */
    @Dict(dicCode = "YXYC-YN")
    @Excel(name = "是否包邮", width = 15)
    @ApiModelProperty(value = "是否包邮")
    private Integer isPostage;
    /**
     * 是否删除
     */
    @TableLogic
    @Excel(name = "是否删除", width = 15)
    @ApiModelProperty(value = "是否删除")
    private Integer isDel;
    /**
     * 是开启积分兑换
     */
    @Excel(name = "是开启积分兑换", width = 15)
    @ApiModelProperty(value = "是开启积分兑换")
    private Integer isIntegral;
    /**
     * 需要多少积分兑换 只在开启积分兑换时生效
     */
    @Excel(name = "需要多少积分兑换 只在开启积分兑换时生效", width = 15)
    @ApiModelProperty(value = "需要多少积分兑换 只在开启积分兑换时生效")
    private Integer integral;
    /**
     * 商户是否代理 0不可代理1可代理
     */
    @Excel(name = "商户是否代理 0不可代理1可代理", width = 15)
    @ApiModelProperty(value = "商户是否代理 0不可代理1可代理")
    private Integer merUse;
    /**
     * 获得积分
     */
    @Excel(name = "获得积分", width = 15)
    @ApiModelProperty(value = "获得积分")
    private BigDecimal giveIntegral;
    /**
     * 成本价
     */
    @Excel(name = "成本价", width = 15)
    @ApiModelProperty(value = "成本价")
    private BigDecimal cost;
    /**
     * 秒杀状态 0 未开启 1已开启
     */
    @Excel(name = "秒杀状态 0 未开启 1已开启", width = 15)
    @ApiModelProperty(value = "秒杀状态 0 未开启 1已开启")
    @Dict(dicCode = "Mer_Jerking_isSeckill")
    private Integer isSeckill;
    /**
     * 砍价状态 0未开启 1开启
     */
    @Excel(name = "砍价状态 0未开启 1开启", width = 15)
    @ApiModelProperty(value = "砍价状态 0未开启 1开启")
    private Integer isBargain;
    /**
     * 是否优品推荐
     */
    @Dict(dicCode = "YXYC-YN")
    @Excel(name = "是否优品推荐", width = 15)
    @ApiModelProperty(value = "是否优品推荐")
    private Integer isGood;
    /**
     * 虚拟销量
     */
    @Excel(name = "虚拟销量", width = 15)
    @ApiModelProperty(value = "虚拟销量")
    private Integer ficti;
    /**
     * 浏览量
     */
    @Excel(name = "浏览量", width = 15)
    @ApiModelProperty(value = "浏览量")
    private Integer browse;
    /**
     * 产品二维码地址(用户小程序海报)
     */
    @Excel(name = "产品二维码地址(用户小程序海报)", width = 15)
    @ApiModelProperty(value = "产品二维码地址(用户小程序海报)")
    private String codePath;
    /**
     * 是否单独分佣
     */
    @Dict(dicCode = "YXYC-YN")
    @Excel(name = "是否单独分佣", width = 15)
    @ApiModelProperty(value = "是否单独分佣")
    private Integer isSub;
    /**
     * 运费模板ID
     */
    @Excel(name = "运费模板ID", width = 15)
    @ApiModelProperty(value = "运费模板ID")
    private Integer tempId;
    /**
     * 规格 0单 1多
     */
    @Dict(dicCode = "YXYC-Specifications")
    @Excel(name = "规格 0单 1多", width = 15)
    @ApiModelProperty(value = "规格 0单 1多")
    private Integer specType;


    @Excel(name = "游戏人数", width = 15)
    @ApiModelProperty(value = "游戏人数")
    private Integer personalNum;

    @Excel(name = "创建类型（0 平台   1 商家）", width = 15)
    @ApiModelProperty(value = "创建类型（0 平台   1 商家）")
    private Integer buildType;


    /**
     * 门店ids
     */
    @Excel(name = "门店ids", width = 15)
    @ApiModelProperty(value = "门店ids")
    private String deptIds;

    private String attributeList;

    private String skuLists;

    /**
     * 商家名称
     */
    @TableField(exist = false)
    private String merName;

    /**
     * 分类名称
     */
    @TableField(exist = false)
    private String cateName;
    /**
     * 商品选择的规格
     */
    @TableField(exist = false)
    private GoodsSkuDto[] skus;
    /**
     * 设置每个商户的价格、库存
     */
    @TableField(exist = false)
    private List<YxMerchantStore> merchantStore;
    /**
     * 商品库存
     */
    @TableField(exist = false)
    private Integer stocks;
    /**
     * 上架状态 0-下架 1-上架
     */
    @TableField(exist = false)
    private Integer status;
    /**
     * 商家商品信息id
     */
    @TableField(exist = false)
    private String storeId;
    /**
     * 删除的商家id
     */
    @TableField(exist = false)
    private JSONObject[] deletedIds;

    /**
     * 会员等级
     */
    @TableField(exist = false)
    private Integer levelId;

    /**
     * 会员价格
     */
    @TableField(exist = false)
    private BigDecimal levelPrice;

}
